#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project ：图灵学习 
@File    ：2.蜻蜓FM数据获取.py
@IDE     ：PyCharm 
@Author  ：ChenLiGao
@Date    ：2024-11-20 16:28
'''
import requests

headers = {
    # 'Accept': 'application/json, text/plain, */*',
    # 'Accept-Language': 'zh,zh-CN;q=0.9',
    # 'Connection': 'keep-alive',
    # # 'Cookie': 'msite_id=a34b8f02-1413-4747-8548-090609ba7780; HWWAFSESID=86969738213d9338eb; HWWAFSESTIME=1732091102835; INGRESSCOOKIE=1732091103.855.131064.811550|9c92c5a980a2afb7a7f825c58c40b9de; _gid=GA1.2.1120094561.1732091105; _ga_F11JB62JM2=GS1.1.1732091105.1.1.1732091402.0.0.0; _ga=GA1.1.1336972022.1732091105',
    # 'Origin': 'https://m.qingting.fm',
    # 'Referer': 'https://m.qingting.fm/',
    # 'Sec-Fetch-Dest': 'empty',
    # 'Sec-Fetch-Mode': 'cors',
    # 'Sec-Fetch-Site': 'same-site',
    'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1',
}

url = "https://webapi.qingting.fm/api/mobile/rank/hotSaleWeekly"

response = requests.get(url, headers=headers).json()
for tem in response["rankinglist"]:
    print(tem)